package cl.orangepeople.whyem.portal.negotiations.beans;

import cl.orangepeople.whyem.portal.backend.api.NegotiationsService;
import cl.orangepeople.whyem.portal.backend.dto.negotiations.NegotiationDTO;
import cl.orangepeople.whyem.portal.backend.dto.negotiations.NegotiationDataBean;
import java.io.Serializable;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import javax.inject.Named;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Scope;

@Named("quickPaymentBean")
@Scope("view")
public class QuickPaymentBean implements Serializable {

    private Logger logger = LoggerFactory.getLogger(QuickPaymentBean.class);
    @Resource(name = "negotiationService")
    private NegotiationsService negotiationsService;
    private NegotiationDTO negotiationDTO;

    @PostConstruct
    public void initBean() {
        negotiationDTO = new NegotiationDTO();
    }

    public String searchQuickNegotiation() {
        NegotiationDataBean negotiationDetail = negotiationsService.getNegotiationDetail(negotiationDTO);
        //@todo: navego adonde?? otro portlet / incluir jar / etc
        return "";
    }

    public NegotiationDTO getNegotiationDTO() {
        return negotiationDTO;
    }

    public void setNegotiationDTO(NegotiationDTO negotiationDTO) {
        this.negotiationDTO = negotiationDTO;
    }
}
